{template modoer_header}
<div id="body">
    <div class="link_path">
        <em class="font_3">
            <!--{loop $links $i $link}-->
            {if $i}<span class="xsplit"> | </span>{/if}
            <a href="$link[url]"{if $link[flag]=='coupon'} style="color:#ff6600;"{/if}>$link[title]</a>
            <!--{/loop}-->
            优惠券数量<b>:</b><span class="font_2">$total</span>
        </em>
        <a href="{url modoer/index}">{lang global_index}</a>&nbsp;&raquo;&nbsp;{print implode('&nbsp;&raquo;&nbsp;', $urlpath)}
    </div>
    <div id="coupon_left">
		<div class="g-list-category">
			<div class="g-list-category-type">
                <h3>分类:</h3>
                <ul class="g-list-category-class">
                    {get:coupon val=category()}
                    <li$active[catid][$val[catid]]><a href="{url coupon/index/catid/$val[catid]}">$val[name]</a></li>
                    {/get}
                </ul>
                <div class="clear"></div>
            </div>
        </div>
		<div class="subrail">
			排序:
            <span$active[order][dateline]><a href="{url coupon/list/sid/$sid/catid/$catid/order/dateline}">最新发布</a></span>
            <span$active[order][pageview]><a href="{url coupon/list/sid/$sid/catid/$catid/order/pageview}">浏览量</a></span>
            <span$active[order][effect1]><a href="{url coupon/list/sid/$sid/catid/$catid/order/effect1}">最有用的</a></span>
            <span$active[order][comments]><a href="{url coupon/list/sid/$sid/catid/$catid/order/comments}">最多评论</a></span>
		</div>
        <div class="mainrail coupon-view">
            {dbres $list $val}
            <div class="il_coupon">
                <h2>[<a href="{url coupon/index/catid/$val[catid]}">$category[$val[catid]][name]</a>]&nbsp;<a href="{url coupon/detail/id/$val[couponid]}">$val[subject]</a></h2>
                <div class="thumb"><a href="{url coupon/detail/id/$val[couponid]}"><img src="{URLROOT}/$val[thumb]" alt="$val[subject]" /></a></div>
                <ul class="info">
                    <li class="full">商户：<a href="{url item/detail/id/$val[sid]}">$val[name]{if $val[subname]}($val[subname]){/if}</a></li>
                    <li>开始日期：{date $val[starttime], 'Y-m-d'}</li>
                    <li>截止日期：{date $val[endtime], 'Y-m-d'}</li>
                    <li class="full">现有<span class="font_2">$val[pageview]</span>次浏览，<span class="font_2">$val[comments]</span>个评论，其中有<span class="font_2">$val[effect1]</span>人认为有用</li>
                    <li class="full">优惠：$val[des]</li>
                </ul>
                <div class="clear"></div>
            </div>
            {/dbres}
            <!--{if $multipage}--><div class="multipage">$multipage</div><!--{/if}-->
            <!--{if !$total}-->
            <div class="messageborder">暂无数据。</div>
            <!--{/if}-->
        </div>

    </div>

    <div id="coupon_right">
        <!--{eval $reviewcfg = $_G['loader']->variable('config','review');}-->
        <div class="mainrail rail-border-3">
            <!--{template item_subject_side}-->
            <!--{eval $model=$I->get_model($subject[catid],1);}-->
            <!--{if $model[usearea]}-->
            <div class="mainrail">
                <div class="rail-h-bt-3 mb10"></div>
                <!--{eval $mapparam = array(
                    'width' => '245',
                    'height' => '245',
                    'title' => $subject[name] . $subject[subname],
                    'p' => $subject[mappoint],
                    'show' => $subject[mappoint]?1:0,
                );}-->
                <iframe src="{URLROOT}/index.php?act=map&{print url_implode($mapparam)}" frameborder="0" scrolling="no" height="245" width="290"></iframe>
                <div style="text-align:center;margin:5px 0;">
                    <!--{if !$subject['mappoint']}-->
                    <a href="javascript:post_map($subject[sid], $subject[pid]);">地图未标注，我来标注</a>
                    <!--{else}-->
                    <a href="javascript:show_bigmap();">查看大图</a>&nbsp;
                    <a href="javascript:post_map($subject[sid], $subject[pid]);">报错</a>
                    <!--{/if}-->
                </div>
            </div>
            <script type="text/javascript">
                function show_bigmap() {
                    <!--{eval $mapparam = array(
                        'width' => '600',
                        'height' => '400',
                        'title' => $subject[name] . $subject[subname],
                        'p' => $subject[mappoint],
                        'show' => $subject[mappoint]?1:0,
                    );}-->
                    var src = "{URLROOT}/index.php?act=map&{print url_implode($mapparam)}";
                    var html = '<iframe src="' + src + '" frameborder="0" scrolling="no" width="100%" height="400" id="ifupmap_map"></iframe>';
                    dlgOpen('查看大图', html, 600, 450);
                }
            </script>
            <!--{/if}-->
        </div>
    </div>

    <div class="clear"></div>
</div>
<!--{eval footer();}-->